import Vue from 'vue'
// 引入vue-router
import VueRouter from 'vue-router'
// 引入About组件
import About from '@/components/About.vue'
import Home from '@/components/Home.vue'

// 应用VueRouter插件
Vue.use(VueRouter)

// 创建并暴露一个路由器
export default new VueRouter({
  mode:'history',
  // routes中配置着一组一组的路由规则
  routes: [
    { path: '/about', component: About },
    { path: '/home', component: Home }
  ]
})

